package com.cartoon.service.impl;

import com.cartoon.entity.Image;
import com.cartoon.dao.ImageDao;
import com.cartoon.service.ImageService;
import com.cartoon.util.ResponseData;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;

import javax.annotation.Resource;

/**
 * (Image)表服务实现类
 *
 * @author makejava
 * @since 2021-12-10 11:28:08
 */
@Service("imageService")
public class ImageServiceImpl implements ImageService {
    @Resource
    private ImageDao imageDao;


    @Override
    public ResponseData getImageInfo(String imageType) {
        try{
            return new ResponseData("0","请求成功！",imageDao.getImageInfo(imageType));
        }
        catch (Exception e){
            System.out.println("图片类型："+imageType);
            return new ResponseData("9924","出错啦，请检查网络是否流畅！");
        }

    }
}
